All Packages Class Hierarchy This Package Previous Next Index
Class sun.server.ServiceParameters
java.lang.Object
|
+----sun.server.ServiceParameters
- public class ServiceParameters
- extends Object
This class provides access to and modification of service configuration
parameters.
-
DEFAULT_GRACE
-
-
DEFAULT_HOST
-
-
DEFAULT_MAX_THREADS
-
-
DEFAULT_MIN_THREADS
-
-
DEFAULT_NAME
-
-
DEFAULT_TIMEOUT
-
-
DEFAULT_VENDOR
-
-
DEFAULT_VERSION
-
-
grace
- The number of seconds to wait during shutdown for handler threads
to become idle.
-
group
- The group to change to when running the service.
-
host
- The host name of the service.
-
maxThreads
- The maximum number of handler threads to run.
-
minThreads
- The minimum number of handler threads to run.
-
name
- The service name.
-
service
- The service object.
-
timeout
- The number of seconds to wait for a new connection before a handler
thread times out.
-
user
- The user to change to when running the service.
-
vendor
- The service vendor.
-
version
- The service version.
-
ServiceParameters(Service)
- Creates new service parameters.
-
ServiceParameters(Service, ExProperties)
- Creates new service parameters initialized from properties.
-
getDefaultHost()
- Returns the default host name.
-
getGrace()
- Returns the shutdown grace period in seconds.
-
getGroup()
- Returns the service group name or id.
-
getHost()
- Returns the service host name.
-
getMaxThreads()
- Returns the maximum number of handler threads.
-
getMinThreads()
- Returns the minimum number of handler threads.
-
getName()
- Returns the service name.
-
getService()
- Gets the service object.
-
getTimeout()
- Returns the handler timeout in seconds.
-
getUser()
- Returns the service user name or id.
-
getVendor()
- Returns the service vendor.
-
getVersion()
- Returns the service version.
-
load(ExProperties)
- Loads initial values of parameters from properties.
-
load(ExProperties, boolean)
- Loads parameters from properties.
-
reset()
- Resets parameters to default values.
-
setGrace(int)
- Sets the shutdown grace peiod in seconds.
-
setGroup(String)
- Sets the service group name or id.
-
setHost(String)
- Sets the service host name.
-
setMaxThreads(int)
- Sets the maximum number of handler threads.
-
setMinThreads(int)
- Sets the minimum number of handler threads.
-
setName(String)
- Sets the service name.
-
setService(Service)
- Sets the service object.
-
setTimeout(int)
- Sets the handler timeout in seconds.
-
setUser(String)
- Sets the service user name or id.
-
setVendor(String)
- Sets the service vendor.
-
setVersion(String)
- Sets the service version.
DEFAULT_NAME
public static final String DEFAULT_NAME
DEFAULT_VERSION
public static final String DEFAULT_VERSION
DEFAULT_VENDOR
public static final String DEFAULT_VENDOR
DEFAULT_HOST
public static final String DEFAULT_HOST
DEFAULT_MIN_THREADS
public static final int DEFAULT_MIN_THREADS
DEFAULT_MAX_THREADS
public static final int DEFAULT_MAX_THREADS
DEFAULT_TIMEOUT
public static final int DEFAULT_TIMEOUT
DEFAULT_GRACE
public static final int DEFAULT_GRACE
service
protected Service service
- The service object.
name
protected String name
- The service name.
version
protected String version
- The service version.
vendor
protected String vendor
- The service vendor.
user
protected String user
- The user to change to when running the service.
group
protected String group
- The group to change to when running the service.
host
protected String host
- The host name of the service.
minThreads
protected volatile int minThreads
- The minimum number of handler threads to run.
maxThreads
protected volatile int maxThreads
- The maximum number of handler threads to run.
timeout
protected volatile int timeout
- The number of seconds to wait for a new connection before a handler
thread times out.
grace
protected int grace
- The number of seconds to wait during shutdown for handler threads
to become idle.
ServiceParameters
public ServiceParameters(Service service)
- Creates new service parameters.
ServiceParameters
public ServiceParameters(Service service,
ExProperties props)
- Creates new service parameters initialized from properties.
getService
public Service getService()
- Gets the service object.
setService
public void setService(Service service)
- Sets the service object.
getName
public synchronized String getName()
- Returns the service name.
setName
public synchronized void setName(String name)
- Sets the service name.
getVersion
public synchronized String getVersion()
- Returns the service version.
setVersion
public synchronized void setVersion(String version)
- Sets the service version.
getVendor
public synchronized String getVendor()
- Returns the service vendor.
setVendor
public synchronized void setVendor(String vendor)
- Sets the service vendor.
getUser
public synchronized String getUser()
- Returns the service user name or id.
setUser
public synchronized void setUser(String user)
- Sets the service user name or id.
getGroup
public synchronized String getGroup()
- Returns the service group name or id.
setGroup
public synchronized void setGroup(String group)
- Sets the service group name or id.
getHost
public String getHost()
- Returns the service host name.
getDefaultHost
public String getDefaultHost()
- Returns the default host name.
setHost
public void setHost(String host)
- Sets the service host name.
getMinThreads
public int getMinThreads()
- Returns the minimum number of handler threads.
setMinThreads
public synchronized void setMinThreads(int minThreads)
- Sets the minimum number of handler threads.
getMaxThreads
public int getMaxThreads()
- Returns the maximum number of handler threads.
setMaxThreads
public synchronized void setMaxThreads(int maxThreads)
- Sets the maximum number of handler threads.
getTimeout
public int getTimeout()
- Returns the handler timeout in seconds.
setTimeout
public synchronized void setTimeout(int timeout)
- Sets the handler timeout in seconds.
getGrace
public synchronized int getGrace()
- Returns the shutdown grace period in seconds.
setGrace
public synchronized void setGrace(int grace)
- Sets the shutdown grace peiod in seconds.
reset
public synchronized void reset()
- Resets parameters to default values.
load
public synchronized void load(ExProperties props)
- Loads initial values of parameters from properties.
load
public synchronized void load(ExProperties props,
boolean updating)
- Loads parameters from properties.
All Packages Class Hierarchy This Package Previous Next Index